<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('企业档案库')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p style="width:98px">关键字：</p>
                                <input type="text" name="keyword"/>
                            </li>
                            <li>
                                                                             行为认定对象：<select name="qualificationType" th:with="type=${@dict.getType('sys_normal_disable')}">
                                        <option value="">全部</option>                                     
							            <option value="项目经理（注册建造师）">项目经理（注册建造师）</option>
										<option value="注册造价工程师">造价咨询从业人员</option>
								   </select>
                            </li>
                            <li>
                                                                             发生地所在市县：<select name="city" th:with="type=${@dict.getType('sys_normal_disable')}">
                                        <option value="">全部</option>                                     
							            <option value="三沙市">三沙市</option>
										<option value="东方市">东方市</option>
										<option value="儋州市">儋州市</option>
										<option value="万宁市">万宁市</option>
										<option value="临高县">临高县</option>
										<option value="澄迈县">澄迈县</option>
										<option value="三亚市">三亚市</option>
										<option value="文昌市">文昌市</option>
										<option value="海口市">海口市</option>
										<option value="五指山市">五指山市</option>
										<option value="陵水县">陵水县</option>
										<option value="乐东县">乐东县</option>
										<option value="昌江县">昌江县</option>
										<option value="保亭县">保亭县</option>
										<option value="屯昌县">屯昌县</option>
										<option value="琼海市">琼海市</option>
										<option value="定安县">定安县</option>
										<option value="琼中县">琼中县</option>
										<option value="白沙县">白沙县</option>
										<option value="洋浦经济开发区">洋浦经济开发区</option>
										<option value="海南国际旅游岛先行试验区">海南国际旅游岛先行试验区</option>
										<option value="三亚现代服务业产业园区">三亚现代服务业产业园区</option>
										<option value="省外">省外</option>
								   </select>
                            </li>
                            <li>
                                                                                           状态：<select name="state" th:with="type=${@dict.getType('sys_normal_disable')}">
							            <option value="">全部</option>
										<option value="正常">正常</option>
										<option value="已撤销">已撤销</option>
								   </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="integrityInformation:personGoodBehavior:export">
		            <i class="fa fa-download"></i> 导出
		        </a>
	        </div>
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:src="@{/js/plugins/datetime/moment.js}"></script>
    <script th:inline="javascript">
    var prefix = ctx + "integrityInformation/peopleBehavior";
    var peoplePrefix = ctx + "enterprise/person";
    
    $(function() {
    	 var options = {
    			url: prefix + "/peopleGoodList",
                exportUrl: prefix + "/peopleGoodExport",
                detailUrl: peoplePrefix + "/renyuanlianghaoDetail/{id}",
                modalName: "人员良好行为",
                columns: [{
	                        field: 'id',
	                        title: '序号',
							formatter: function (value, row, index) {
							
							    return index + 1;
							}
                    	}, 
						{
	                        field: 'guid',
	                        title: '标识符',
							visible: false
	                    }, 
						{
                        field: 'behaviorDescription',
                        title: '行为描述',
                        formatter: function (value, row, index) {
                            var actions = [];
                            actions.push('<a href="javascript:void(0)" onclick="$.operate.detailFullRewrite(\'' + "人员良好行为详细内容" + '\',\'' + row.guid + '\')">'+value+'</a>');
                            return actions.join('');
                        }
                    }, 
					{
                        field: 'personName',
                        title: '姓名'
                    }, 
					{
                        field: 'idcard',
                        title: '证件号码'
                    }, 
					{
                        field: 'engineeringName',
                        title: '工程名称'
                    }, 
					{
                        field: 'engineeringGuid',
                        title: '工程标识符',
						visible: false
                    },
                    {
                        field: 'agencyName',
                        title: '奖励机构'
                    },
                    {
                        field: 'score',
                        title: '加分分值'
                    },
                    {
                        field: 'pubDate',
                        title: '登记日期',
						formatter: function (value, row, index) {
							if($.common.isNotEmpty(value)){
								var strDate = value;
								value =  moment(strDate,'YYYY-MM-DD').format('YYYY-MM-DD');	
							}
							return value;
						}
                    },
                    {
                        field: 'state',
                        title: '状态'
	                }]
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>